﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="add.aspx.cs" Inherits="UI.Web.add" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="viewport"  content="width=device-width,user-scalable=no"/>
	<title>添加小黄车信息</title>
	<link rel="Bookmark" href="http://uploadico.55.la/upload/ico/2016/09/06/19/hdImg_a1fd82ff93cc62a11fa561ad7cb38c2614731597105_1473159936.ico" />
	<link rel="Shortcut Icon" href="http://uploadico.55.la/upload/ico/2016/09/06/19/hdImg_a1fd82ff93cc62a11fa561ad7cb38c2614731597105_1473159936.ico" />
    <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
	<script type="text/javascript">
	    function addche() {
	    
	        var reg = /^[0-9]{5}$/;
	        var reg2 = /^[0-9]{4}$/;
	        if (!reg.test($(".chepai").val())) {
	            alert("请正确输入车牌号码");
	            return;
	        }
	      
	        if (!reg2.test($(".password").val())) {
	            alert("请正确输入车牌密码");
	            return;
	        }
	        confirm("请核对车牌密码：" + $(".chepai").val() + " 确定无误？")
	        
	            confirm("请核对车牌密码：" + $(".password").val() + " 确定无误？")
	       
	        var s = "";

	        s = $.ajax({
	            type: "POST",
	            url: "AjaxAction.ashx",
	            data: {
	                dowhat: "addche",
	                chepai: $(".chepai").val(),
	                password: $(".password").val(),
	                author: $(".author").val(),
	            },
	            async: false
	        }).responseText;
	        if (s == "success") {
	            alert("添加成功，代表华农广大学子深深的感谢你！");
	            window.location.reload();
	        }
	        else {
	            alert(s);}
	    }
		</script>
	<style>
	/* css 重置 */
	body, p, div, input, h1, h2, h3, h4, h5, h6, ul, li, dl, dt, dd, form { list-style: none; vertical-align: middle; font-weight:normal; }
	img { border: 0 }
	body { -webkit-user-select: none; -webkit-text-size-adjust: none; font:normal 16px/200% arial; text-align:left; background: url(bg.jpg) no-repeat; background-size: cover;}
	*{ margin: 0; padding: 0 }
	a{text-decoration:none;color:#000;}
	.title{color: white;position: absolute;left: 28%;top: 20%;font-size: 24px;}
    .chepai{position: absolute;left: 25%;top: 51%;width: 58%;height: 28px;text-align:center;color:#fed52f }
    .password{position: absolute;left: 25%;top: 60%;width: 58%;height: 28px;text-align:center;color:#fed52f }
    .start{position: absolute;left: 25%;top: 70%;width: 59%;height: 34px;background-color: #fed52f;color: white;border-radius: 2px;text-align: center;}
     .yongche{position: absolute;left: 65%;top:80% ;color:white;font-size: 12px;}
    .banquan{position: absolute;left: 16%;top:92% ;color:white;font-size: 8px;}
	</style>
</head>
<body>

  <div class="container">
  		<h4  class="title">小黄侠-<%=team.name %></h4>
      <input type="hidden" class="author" value="<%=team.name %>"/>
		<input type="text" class="chepai" placeholder="请输入车牌号"/>
		<input type="text" class="password" placeholder="请输入获得的密码"/>
		<a href="javacript:void(0)" class="start" onclick="addche()"> 添加</a>
		<a href="default.aspx" class="yongche">返回用车</a>
			 <p class="banquan">Copyrigth &copy;2016 &nbsp; PoweredBy &nbsp;DYT&nbsp;版权-Financail postgraduate of SCAU </p>
  </div>




</body>
</html>